package com.ruoyi.utils;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.http.HttpUtils;
import com.ruoyi.common.utils.sign.Md5Utils;

public class Test {

    public static void main(String[] args) {
        String url = "https://api.shumaidata.com/v10/book/isbn";
        String apiId = "6hzbTd9IbGwG5aaV";
        String apiSecret = "6hzbTd9IbGwG5aaVnk9z5JDMq2CtxXZW";
        String isbn = "9787121367410";
        String timeStamp = System.currentTimeMillis() + "";
        String str = apiId + "&" + timeStamp + "&" + apiSecret;
        String sign = Md5Utils.hash(str);
        String requestParams = "appid=" + apiId + "&timestamp=" + timeStamp + "&sign=" + sign + "&isbn=" + isbn;
        String res = HttpUtils.sendSSLPost(url, requestParams);
        System.out.println(res);
    }

}
